import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)

let defaultCity = localStorage.city ? localStorage.city : "西安"
const state = {
	city:defaultCity
}
const mutations = {
	changeCity(state,city){
		console.log(state.city)
		state.city = city
		localStorage.city = city
	}
}
export default new Vuex.Store({
	state,
	mutations
})